<template>
	<div>
		<!-- v-for循环一定要添加一个key属性 -->
		<p v-for="item in swiperList" :key="item id">
			<img :src="item =.imgURL" />
		</p>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				// 当数组中需要加载文件的路径作为元素时，一定要加上require()
				swiperList:[
					{ id:1,imgURL:require('@/assets/img/1.jpg') },
					{ id:2,imgURL:require('@/assets/img/2.jpg') },
					{ id:3,imgURL:require('@/assets/img/3.jpg') },
					{ id:4,imgURL:require('@/assets/img/4.jpg') },
					{ id:5,imgURL:require('@/assets/img/5.jpg') }
				]
			}
		}
	}
</script>

<style scoped>
	.header-swipers{
		width: 100%;
		height: 4.18rem;
		overflow: hidden;
	}
	
	.header-swipers img{
		width: 100%;
		height: 54.4%;
	}
</style>
